{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=512
  Verdict: Accepted
}
var i,n,m,c,k:longint;
begin
assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);
read(n);
m:=0;
c:=0;
for i:=1 to n do begin
    read(k);
    if k>0 then inc(c) else begin
       if m<c then m:=c;
       c:=0;
    end;
end;
if m<c then m:=c;
write(m);
end.